<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>HOME</title>
</head>
<body>

	<script type='text/javascript'>
		  
			function checkInput(nomeutente, password){

				var dati = 'LoginServlet?nomeutente=';
				
				if(nomeutente.value.length == 0){
					alert("Nome utente non inserito");
					elem.focus();}
					else if(password.value.length == 0){
						alert("Password non inserita");
						elem.focus();
					}
				else{

					dati = dati + nomeutente.value;
					dati = dati + '&password=';
					dati = dati + password.value;
					window.location = dati;					
				}
				
			}
			
			function verify(){
				
				window.location = 'provaServlet';
			}
			function popola() {
				var utente = '/swimv2Client/RegistrazioneServlet?nome=popola';
				window.location = utente;

			}
		</script>

	<form name="Login" action="LoginServlet" method="get">

		<table border="0" cellpadding="1" cellspacing="2" width="100%">

			<TBODY>

				<tr>
					<td align="left" width="0%">Id:</td>
					<td align="left" width="50%"><INPUT id="nomeutente"
						name="nomeutente" value=""></td>


					<td align="left" width="0%">Password:</td>
					<td align="left" width="0%"><INPUT id="password"
						name="password" type="password" value=""></td>
				</tr>

				<tr>
					<td align="left" width="0%"></td>
					<td align="left" width="0%"><input type="button" value="Login"
						onClick="checkInput(document.getElementById('nomeutente'), document.getElementById('password'))"></td>
						<td align="left" width="0%"><input type="button" value="Verifica"
						onClick="verify()"></td>
						<td align="left" width="0%"><input type="button" value="Popola"
						onClick="popola()"></td>
				</tr>
				

			</TBODY>

		</table>

		<!--ATTENTION!!! ALARM!!!-->
		<a href="/swimv2Client/loginjsp/Registrazione.jsp"><b>Registra
				un nuovo utente</b></a><br> <br>
		<a href="/swimv2Client/loginjsp/Amministratore.jsp"><b>Registra
				un nuovo amministratore</b></a><br> <br>
				<a href="/swimv2Client/loginjsp/index.jsp"><b>index
				un nuovo amministratore</b></a><br> <br>
	</form>
</body>
</html>
				